require "import"
import "android.content.Intent"
import "android.graphics.Bitmap"
import "android.net.Uri"
import "java.io.*"
import "com.androlua.*"
app_pkg="com.bemyeyes.bemyeyes"
store_url="market://details?id="
task(500, function()
if this.getPackageManager().getLaunchIntentForPackage(app_pkg) then
this.getScreenShot( {
onScreenCaptureDone = function(A0_4)
A0_4.compress(Bitmap.CompressFormat.PNG, 90, FileOutputStream(File("/sdcard/", "master_kaushik.jpg")))
this.startActivity(Intent(Intent.ACTION_SEND).setType("image/*").setPackage(app_pkg).putExtra(Intent.EXTRA_STREAM, this.getUriForFile(File("/sdcard/master_kaushik.jpg"))))
end})
else
this.startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(store_url .. app_pkg)))
end
end)